Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R4R]fix code of difflayer not assgin before return #808

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

unclezoro
Copy link
Collaborator

@unclezoro unclezoro commented Mar 17, 2022

Description

Bugfix for diff layer may have nil code even there is a new smart contract created in the block.

Rationale

The bug is introduced in pipecommit PR.
When doing Commit of StateDB, the difflayer is returned while the commmitTrie routine may assign the code of difflayer in the future.

This bug will impact the diff sync: difflayer may not contains the all changed codes.

Example

No

Changes

After this patch, the node can always get the same difflayers.

Copy link
Contributor

@setunapo setunapo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@unclezoro unclezoro merged commit 9d5062d into bnb-chain:develop Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants